package com.wanghengzhi.girlfriend.rbac.core;

import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;

/**
 * @author 王潇
 * @since 2021.6.24
 */
@Data
public class PageParamVO {

    private static final String PAGE_MUST_THAN_ONE  = "页码须大于1！";
    private static final String SIZE_BETWEEN_1_100  = "数量须在 1 到 100 内！";

    /**
     * 页码
     */
    @Min(value = 1,message = PAGE_MUST_THAN_ONE)
    private Integer page;

    /**
     * 数量
     */
    @Min(value = 1, message = SIZE_BETWEEN_1_100)
    @Max(value = 100, message = SIZE_BETWEEN_1_100)
    private Integer size;
}
